﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using Maticsoft.Common;
using LTP.Accounts.Bus;
namespace cebao.Web.ForestPets
{
    public partial class Add : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSave_Click(object sender, EventArgs e)
        {                 
            string petsName = this.txtpetsName.Text;                   
            string petStage = this.txtpetStage.Text;          
            
            string femaleNums = this.txtfemaleNums.Text;
            string maleNums = this.txtmaleNums.Text;        

            cebao.Model.ForestPets model = new cebao.Model.ForestPets();
            model.address = this.txtaddress.Text;
            model.inputTime = DateTime.Now;
            model.petsName = petsName;
            model.petsId = 165;           
            model.petStage = petStage;           
            model.femaleNums = femaleNums;
            model.maleNums = maleNums;           
            model.uid = 502;            
            

            cebao.BLL.ForestPets bll = new cebao.BLL.ForestPets();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功！", "add.aspx");

        }


        public void btnCancle_Click(object sender, EventArgs e)
        {
            Response.Redirect("list.aspx");
        }
    }
}
